package com.mystrategy;

/**
 * 策略模式
 * @author yulipeng
 *
 */
public class ZMainTest {

	public static void main(String[] args) {
		
		PayInterface netPay = new NetPay();
		PayInterface guitaiPay = new GuitaiPay();
		
		Bank bank = new JiaotongBank(guitaiPay);
		bank.bankName();
		bank.pay();
		bank.payNotify();
		System.out.println();
		
		
		Bank bank2 = new GuangdaBank(netPay);
		bank2.bankName();
		bank2.pay();
		bank2.payNotify();
		System.out.println();
	}
}
